

#include "my_unordered_map.h"


void TestMap01()
{
	what::unordered_map<int, std::string> ht;
	ht.insert({ 1, "haha" });
	ht.insert({ 10, "hehe" });
	ht.insert({ 4, "xixi" });
	ht.insert({ 14, "apple" });
	ht.insert({ 16, "cici" });
	ht.insert({ 0, "luelue" });

	what::unordered_map<int, std::string>::iterator it = ht.begin();
	while (it != ht.end())
	{
		std::cout << it->first << ": " << it->second << std::endl;
		++it;
	}

	std::cout << std::endl;

	for (auto& e : ht)
	{
		std::cout << e.first << ": " << e.second << std::endl;
	}
}